#include <iostream>
#include <string>
using namespace std;

class ABS {
public:
		virtual string gettype(){
			return "base type";
		};
};

class ABS_str : public ABS{
public:
	 string gettype(){return "string";};
};


class ABS_int : public ABS{
public:
	string gettype(){return "integer";};
};

int main(){
	ABS *ptr;
	ABS_str as;
	ABS_int ai;
	ptr=&as;
	cout <<"type of as " << ptr->gettype() << endl;
	ptr=&ai;
	cout <<"type of ai " << ptr->gettype() << endl;
	return 0;
}	
